package com.yingxin.yxerp.module.print.vo.req;

import cn.hutool.core.collection.CollectionUtil;
import com.yingxin.yx.framework.commons.constant.CommonConst;
import com.yingxin.yx.framework.commons.dto.PageIn;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 打印申请
 * @author fanchao
 * @since 2022-03-21
 */

@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value="PrintApplyQueryVo对象", description="打印申请")
public class PrintApplyQueryVo extends PageIn {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id ")
    private String id;

    private String applyNo;

    @ApiModelProperty(value = "0 申请中 1通过 -1不通过")
    private String approvalStatus;

    @ApiModelProperty(value = "业务id")
    private String businessId;

    @ApiModelProperty(value = "业务类型")
    private String businessType;

    @ApiModelProperty(value = "业务no")
    private String businessNo;

    @ApiModelProperty(value = "invalid 含未通过")
    private List<String> checkedList;

    public String getInvalid() {
        return CollectionUtil.isEmpty(checkedList) ? null : (checkedList.contains("invalid") ? CommonConst.TRUE : null);
    }

}
